<div id="layout_main_top">

</div>
<div id="layout_main">

<script>
{literal}
var updateStrength = function(pw) {
	var strength = getStrength(pw);
	var width = (100/32)*strength;
	new Effect.Morph('psStrength', {style:'width:'+width+'px', duration:'0.4'}); 
}
{/literal}
</script>

{if !isset($message)}

<form action="index.php?page=register" method="post">
<INPUT TYPE=HIDDEN NAME="action" value="register">
  <table id="small_table" cellspacing='0'>
    <tr class="menu_header">
  	<th colspan='3'>
  	New Account
  	</th>
  	</tr>
  	
  	<tr class="row_1">
	<td colspan='3' class="staticboldcenter">
	Please insert the following information:<br><span class="error">{$errormessage}</span><br>
	</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
		<br>
		</td>
		<td class="autonormaltop">
		<br>
		</td>
		<td class="autonormaltopright" width="16px">
		<br>
		</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
			<img src="./images/buttons/icon-hint.png" width="16px" height="16px" align="left"{popup text="This is the name you will be identified with for the administrator, can be your realname or nickname."  center=#overlib_center# wrap=true offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}></img>Name:
		</td>
		<td class="autonormalcenter">
			<input type="text" id="name" class="largetext" name="name" value="{$name}">
		</td>
		<td class="autonormal">
			{if isset($name_error)}
				<img src="./images/buttons/icon-error.png" width="16px" height="16px" {popup text=$name_error   center=#overlib_center# wrap=true offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}></img>
			{/if}
		</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
			<img src="./images/buttons/icon-hint.png" width="16px" height="16px" align="left"{popup text="This is the username you will use to login into the website."  center=#overlib_center# wrap=true offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}></img>Login name:
		</td>
		<td class="autonormalcenter">
			<input type="text" id="username" class="largetext" name="username" value="{$username}">
		</td>
		<td class="autonormal">
			{if isset($username_error)}
				<img src="./images/buttons/icon-error.png" width="16px" height="16px" {popup text=$username_error   center=#overlib_center# wrap=true offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}></img>
			{/if}
		</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
		<br>
		</td>
		<td class="autonormalcenter">
		</td>
		<td class="autonormal">
		<br>
		</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
			Password:
		</td>
		<td class="autonormalcenter">
			<input type="password" id="password1" class="largetext" name="password1" value="{$password1}" onKeyUp="updateStrength(this.value)" />
		</td>
		<td class="autonormal">
			{if isset($password1_error)}
				<img src="./images/buttons/icon-error.png" width="16px" height="16px" {popup text=$password1_error   center=#overlib_center# wrap=true offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}></img>
			{/if}
		</td>
	</tr>

  	<tr class="row_1">
		<td class="staticboldright">

		</td>
		<td class="autonormalcenter">
		<div id="psContainer">
				<div id="psStrength" align="center"></div>
		</div>
		</td>
		<td class="autonormal">
		</td>
	</tr>

	
  	<tr class="row_1">
		<td class="staticboldright">
			Confirm:
		</td>
		<td class="autonormalcenter">
			<input type="password" id="password2" class="largetext" name="password2" value="{$password2}">
		</td>
		<td class="autonormal">
			{if isset($password2_error)}
				<img src="./images/buttons/icon-error.png" width="16px" height="16px" {popup text=$password2_error   center=#overlib_center# wrap=true offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}></img>
			{/if}
		</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
		<br>
		</td>
		<td class="autonormalcenter">
		</td>
		<td class="autonormal">
		<br>
		</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
			Email:
		</td>
		<td class="autonormalcenter">
			<input type="text" id="email" class="largetext" name="email" value="{$email}">
		</td>
		<td class="autonormal">
			{if isset($email_error)}
				<img src="./images/buttons/icon-error.png" width="16px" height="16px" {popup text=$email_error   center=#overlib_center# wrap=true offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#}></img>
			{/if}
		</td>
	</tr>
  	<tr class='row_1'>
		<td class='staticboldright'>
		<br>
		</td>
		<td class='autonormalcenter'>
		</td>
		<td class='autonormal'>

		</td>
	</tr>
  	<tr class="row_1">
		<td class="staticboldright">
			Class Display:
		</td>
		<td class="autonormalcenter">
		<select name="class_display" id="class_display" class="large">
			<option value="1">Icons only</option>
			<option value="2">Coloured player names only</option>
			<option value="3">Icons and Coloured player names</option>
		</select>
		</td>
		<td class="autonormal">
		</td>
	</tr>
	
  	<tr class="row_1">
		<td class="staticboldright">
		<br>
		</td>
		<td class="autonormalbottom">
		<br>
		</td>
		<td class="autonormalbottomright">
		&nbsp;
		</td>
	</tr>
	<tr class="row_1">
		<td class="staticboldcenter" colspan="3">
		<br>
		<input name="newuser" type="submit" value="Register">
		</td>
	</tr>
	
 </table> 
</form>

{else}



<DIV class="MenuHead">
Succesfull!
</DIV>

<DIV class="MenuText">
{$message}
</DIV>




{/if}

</div>
<div id="layout_main_bottom">

</div>